Wireless networks are increasingly commonly employed to provide enhanced capabilities for a variety of devices. One category of wireless networks is a wireless Personal Area Network (PAN). One suitable format for communications in a wireless PAN is described by the ZigBee Specification for low cost, low power wireless radio links, as defined by the ZigBee Alliance. ZigBee wireless PANs are especially suitable for use, for example, in home automation networks for controlling lights, security systems, fire alarms, heating-ventilation-and-air-conditioning (HVAC) systems, etc.
FIG. 1 shows one exemplary embodiment of a wireless network 100 including a plurality of wireless devices 120. Wireless network 100 may be a ZigBee wireless PAN. In the wireless network 100, wireless devices 120 are classified into three different categories: PAN Coordinator 120a, Routers 120b, and End Devices 120c. In the context of a ZigBee wireless PAN, each of these wireless devices is also sometimes referred to as a “node.”
Each ZigBee wireless network includes a PAN Coordinator 120a. PAN Coordinator 120a is the ZigBee device responsible for starting the formation of the wireless network 100. PAN Coordinator 120a is able to store information about the wireless network 100 (e.g., security keys). PAN Coordinator 120a chooses the PAN ID, and conventionally has a ZigBee address of 0.
Wireless network 100 may include a plurality of Routers 120b. Router 120b has the capability to pass data from one wireless device 120 to another wireless device 120, and may also act as a source and destination for data communications.
In contrast, End Device 120c includes just enough functionality to communicate with its “parent node”—which may be either a Router 120b or PAN Coordinator 120a. End Device 120c cannot directly pass messages between two other wireless devices 120. Accordingly, End Device 120c requires the least amount of memory and therefore in general can be manufactured at a lower cost than PAN Coordinator 120a or Router 120b. 
In a ZigBee wireless PAN, communication between nodes 120 takes place over one of a number of “physical channels.” ZigBee wireless PANs and wireless devices employ functionality described in IEEE Standard 802.15.4-2003. IEEE 802.15.4-2003 has two physical (PHY) layers that operate in respective upper and lower frequency ranges: 868/915 MHz and 2.4 GHz. The lower frequency PHY layer covers both the 868 MHz European band and the 915 MHz band, used in countries such as the United States and Australia. The higher frequency PHY layer is used virtually worldwide.
The 2.4 GHz communications band contains 16 separate IEEE 802.15.4 channels, so a number of ZigBee wireless PANs can operate simultaneously, with each operating on its own channel(s) and thereby not interfere with each other. It is possible for more than one ZigBee wireless PAN to use a single channel, especially if they are separated by a long distance (>10-100 m away), or if both have fairly low usage rates (low duty cycle).
Other devices (e.g., so-called “WiFi” devices) also operate in the 2.4 GHz band, and WiFi traffic can interfere with ZigBee traffic. WiFi messages can be transmitted at a much higher power level than ZigBee messages, and a WiFi channel is as wide in bandwidth as several ZigBee channels. In order for two such systems to coexist it is beneficial to be able to work out which channels are clear, and to get the interfered-with network (e.g. the ZigBee wireless PAN) to operate on these clear channels.
Toward this end, the ZigBee specification provides a mechanism whereby a PAN Coordinator can instruct another wireless device to carry out an “energy detection scan” (ED scan) for one or more communication channels. IEEE Standard 802.15.4-2003 section 6.7.7 specifies that an ED measurement is an estimate of the received signal power within the bandwidth of a communication channel. A time interval of 8 IEEE 802.15.4 symbol periods is used for the ED measurement. The specification provides that an energy detection scan obtains a measure of the “peak energy” for each requested communication channel from a plurality of ED measurements performed on the communication channel over a specified scan duration, by returning an energy value corresponding to the maximum ED measurement result during the scan period.
In this regard, the ZigBee specification provides a management network update request (“Mgmt_NWK_Update_req”) which a PAN Coordinator can transmit to another wireless device (e.g., a Router) in the ZigBee wireless PAN, either directly or via a Router 120b. 
Table 1 illustrates the format of the Mgmt_NWK_Update_req command in the ZigBee specification:
TABLE 1Octets: 4142ScanChannelsScanDurationActiveChannelnwkManagerAddrIn Table 1, the fields include:                ScanChannels specifies the communication channels for which the energy detection scan should be preformed;        ScanDuration specifies the duration for which each energy detection scan should be performed;        ActiveChannel is a subset of the ScanChannels parameter and represents a list of prospective channels on which to operate the PAN; and        nwkManagerAddr specifies the NWK address for the device with the Network Manager bit set in its node descriptor.        
In response to a management network update request issued by the PAN Coordinator, a wireless device performs a single ED scan for the specified scan period for each of the specified communication channels; stores energy values corresponding to the maximum energy detected during the scan period, and transmits a management network update response (“Mgmt_NWK_Update_rsp”) message including the energy values.
Table 2 illustrates the format of the Mgmt_NWK_Update_rsp message in the ZigBee specification:
TABLE 2Octets: 141VariableStatusScannedChannelsScannedChannelsListCountEDandTXfailureListIn Table 2:                Status specifies the status of the Mgmt_NWK_Update_rsp command (e.g., SUCCESS; INVALID REQUEST; NOT_SUPPORTED);        ScannedChannels is a list of channels scanned by the request;        ScannedChannelsListCount is a list containing the number of records contained in the EDandTXfailureList parameter; and        EDandTXfailureList is a list of descriptors, one for each of the channels in the ScannedChannelsListCount, of the energy values and transmission failure report descriptors created as a result of the management network update request.        
The above-described procedure suffers from several deficiencies.
In particular, there are several shortcomings to characterizing the availability of a communication channel based only upon energy values each corresponding to a maximum energy detected in a single energy detection scan. For example, some interfering devices may transmit data in an intermittent fashion, perhaps with a low duty cycle. In that case, the energy detection scan described above can lead to misleading results.
At the outset, if the energy detection scan is performed during a time period when an intermittently-interfering device is not transmitting, the energy value may be very low, indicating only the presence of background noise and not recognizing the presence of an intermittent interferer.
To address this problem, the scan period may be lengthened to try to ensure that intermittent transmissions are captured in the energy detection scan. However in that case, since the energy value produced in an energy detection scan reflects only the maximum energy detected over the scan period, it is not possible to know how much of the time (if any) the received power level may actually be much less than the maximum energy level. That is, if the energy detection scan is performed during a scan period when an intermittently-interfering device happens to be transmitting, the maximum energy may be very high, inaccurately indicating a total unavailability for the communication channel. However, in reality, if the duty cycle is low enough, such a communication channel may still be useable for certain types of communication where 100% channel availability is not required. So, no matter how the scan period may be adjusted, there is a problem in appropriately characterizing communication channels by using energy values each corresponding to a maximum energy detected in a single energy detection scan.
Furthermore, different ZigBee wireless devices may transmit different types of payload data with differing data rate requirements, different duty cycles, different latency requirements, etc. Accordingly, interference in a communication channel that might make the communication channel unsuitable for communication by one wireless device, might not present a major problem for communication by another wireless device with different data communication requirements. However, an energy value reflecting a maximum energy value measured from a single energy detection scan will not reveal such subtleties.
In general, a simple list of energy values for each communication channel corresponding to a maximum energy detected in a single energy detection scan does not provide a robust data set that facilitates optimal decisions for selecting communication channels.
Furthermore, although the problems described above have been illustrated with respect to details of a wireless device operating in a ZigBee PAN, in general problems may occur in other communication networks when only a single energy value is used to try to characterize the availability of a communication channel, even in networks where the energy value is not a maximum detected energy or is obtained from a single measurement rather than from a scan.
Accordingly, it would be desirable to provide a wireless device capable of gathering and reporting data concerning communication channel conditions for a wireless device in a wireless network that can overcome one or more of the above shortcomings. It would further be desirable to provide an improved method of gathering and reporting data concerning communication channel conditions for a wireless device in a wireless network.
In one aspect of the invention, a method is provided for reporting communication channel conditions for a wireless device adapted to operate in a wireless network. The method comprises: for each of one or more selected communication channels among a plurality of communication channels over which the wireless device is adapted to communicate, performing a plurality of energy detection scans to obtain a plurality of energy values each corresponding to a maximum energy detected in the corresponding communication channel during each energy detection scan period; for each of the selected communication channels, calculating at least one statistic from the energy values obtained in the plurality of energy detection scans; for each of the selected communication channels, determining at least one metric related to the communication channel's availability for communications, based on the at least one statistic; and reporting the at least one metric for each of the scanned communication channels to at least one other wireless device in the wireless network.
In another aspect of the invention, a method of operating a wireless device includes obtaining statistical data regarding each of one or more communication channels over which the wireless device is adapted to communicate, and reporting from the wireless device to at least one other wireless device at least one metric related to an availability of each of the one or more communications channels for communications.
In a further aspect of the invention, a wireless device adapted to communicate with at least one node in a wireless network, includes a transmitter; a receiver adapted to operate over a plurality of communication channels; an energy detector coupled to the receiver and adapted to perform an energy detection scan in a selected communication channel; and one or more processors. The processor(s) are configured to execute an algorithm, including: employing the energy detector to perform a plurality of energy detection scans for each of one or more selected communication channels among a plurality of communication channels over which the wireless device is adapted to communicate, to obtain a plurality of energy values each corresponding to a maximum energy detected in the corresponding communication channel during an energy detection scan period; for each of the selected communication channels, calculating at least one statistic from the energy values obtained in the plurality of energy detection scans; for each of the selected communication channels, determining at least one metric related to the communication channel's availability for communications, based on the at least one statistic; and providing to the transmitter for transmission the at least one metric for each of the selected communication channels.
In yet another aspect of the invention, a device is adapted to wirelessly communicate with at least one node in a wireless network. The device is adapted to obtain statistical data regarding each of one or more selected communication channels over which the wireless device is adapted to communicate, and to report from the wireless device to at least one other wireless device at least one metric related to an availability of each of the one or more selected communications channels for communications.